package com.typing.entity;

import java.util.Date;
import java.util.Objects;

/**
 * 提取公共属性
 */
public class CommonProperties {
	//	创建者
	private String createBy;

	//	创建日期
	private Date createDate;

	//	更新者
	private String updateBy;

	//	更新日期
	private Date updateDate;

	//	删除标志
	private String delFlag;

	public CommonProperties() {
	}

	public CommonProperties(String createBy, Date createDate, String updateBy, Date updateDate, String delFlag) {
		this.createBy = createBy;
		this.createDate = createDate;
		this.updateBy = updateBy;
		this.updateDate = updateDate;
		this.delFlag = delFlag;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		CommonProperties that = (CommonProperties) o;
		return Objects.equals(createBy, that.createBy) && Objects.equals(createDate, that.createDate) && Objects.equals(updateBy, that.updateBy) && Objects.equals(updateDate, that.updateDate) && Objects.equals(delFlag, that.delFlag);
	}

	@Override
	public int hashCode() {
		return Objects.hash(createBy, createDate, updateBy, updateDate, delFlag);
	}

	@Override
	public String toString() {
		return "CommonProperties{" +
				"createBy='" + createBy + '\'' +
				", createDate=" + createDate +
				", updateBy='" + updateBy + '\'' +
				", updateDate=" + updateDate +
				", delFlag='" + delFlag + '\'' +
				'}';
	}
}
